def caesar_cipher(input_str):
    key = 3  # 凯撒密码偏移量
    encoded_str = ""
    for char in input_str:
        if char.isupper():
            encoded_str += chr((ord(char) + key - 65) % 26 + 65)
        elif char.islower():
            encoded_str += chr((ord(char) + key - 97) % 26 + 97)
        else:
            encoded_str += char
    return encoded_str
